package com.nowc.week.w105_ak;

import java.io.*;

public class c {

    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static StreamTokenizer in = new StreamTokenizer(br);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        solve();
        out.flush();
        out.close();
        br.close();
    }

    static void solve() throws IOException {
        in.nextToken(); int n = (int) in.nval;
        in.nextToken(); int k = (int) in.nval;
        if ((k & 1) != 0) {
            out.println(-1);
            return;
        }
        int x = k / 2;
        int[][] ans = new int[n][n];
        for (int i = 0; i < x; i++) {
            ans[i][i] = 1;
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                out.print(ans[i][j]);
            }
            out.println();
        }
    }

}
